import { identity, pickBy } from 'lodash';
import request from '@/http/request';
import { IQueryParams } from '@/widgets/table-pagination';

export function fetchDict(queryParams: any) {
  let params: any = {
    ...queryParams,
    pageNo: queryParams.pageNum,
    ...pickBy(queryParams.filter, identity),
  };

  return request.get(`/dictionary/getPage?${new URLSearchParams(params)}`);
}
export function fetchAllDict() {
  return request.get(`/admin-api/system/dict-data/list-all-simple`);
}
